package cn.thread;
//线程控制
public class MyThreadController extends Thread{
    @Override
    public void run() {
        for(int i=1;i<=100;i++){
            System.out.println(getName()+":"+i);
            try {
                Thread.sleep(1000);//线程睡眠1000毫秒
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
